//
//  StatuesOriView.swift
//  Weibo
//
//  Created by mac on 16/1/18.
//  Copyright © 2016年 mac. All rights reserved.
//

import UIKit

class StatuesOriView: UIView {

//    private var statues
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setupUI() {
        self.addSubview(headerImage)
        self.addSubview(nameLabel)
        self.addSubview(vipImage)
        self.addSubview(timeLabel)
        self.addSubview(sourceLabel)
        self.addSubview(contentLabel)
        
        self.headerImage.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.snp_left).offset(10)
            make.top.equalTo(self.snp_top).offset(10)
            make.size.equalTo(40)
        }
        
        self.nameLabel.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.headerImage.snp_right).offset(10)
            make.top.equalTo(self.headerImage.snp_top)
        }
        
        self.vipImage.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.nameLabel.snp_right).offset(10)
            make.centerY.equalTo(self.nameLabel.snp_centerY)
        }
        
        self.timeLabel.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.headerImage.snp_right).offset(10)
            make.bottom.equalTo(self.headerImage.snp_bottom)
        }
        
        self.sourceLabel.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.timeLabel.snp_right).offset(10)
            make.bottom.equalTo(self.timeLabel.snp_bottom)
        }
        
        self.contentLabel.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.headerImage.snp_left)
            make.top.equalTo(self.headerImage.snp_bottom).offset(10)

        }
        
        self.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo(self.contentLabel.snp_bottom).offset(10)
        }
    }
    
    
    private lazy var headerImage: UIImageView = UIImageView(image: UIImage(named: "avatar_default_big"))
    
    private lazy var nameLabel: UILabel = UILabel(title: "马克马可", color: UIColor.redColor(), fontSize: 16)
    
    private lazy var vipImage: UIImageView = UIImageView(image: UIImage(named: "common_icon_membership"))
    
    private lazy var timeLabel: UILabel = UILabel(title: "12:12", color: UIColor.orangeColor(), fontSize: 14)
    
    private lazy var sourceLabel: UILabel = UILabel(title: "向日葵", color: UIColor.lightGrayColor(), fontSize: 14)
    
    private lazy var contentLabel: UILabel = UILabel(title: "哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈", color: UIColor.blackColor(), fontSize: 15,marginSize: 10)
    
    
    
    
    
    
    
    
    
    
    

}
